<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="IndexUsuario.xhtml">

	<ui:define name="conteudo">
		<f:loadBundle basename="br.ucb.jogo.recursos.messages" var="msg" />
		<h:form id="form">
			<p:panel styleClass="FundoPaginaUsuario">
				<br />
				<br />
				<br />
				<center>
					<p:panel styleClass="PainelTrabalho">
						<h:outputText
							value="#{msg.TREINO_PERSONAGEM_2}" />

					</p:panel>
					<p:dataTable emptyMessage="#{msg.NENHUM_TREINO}" var="treino" value="#{treinoManagedBean.treinos}" 
					rowKey="#{treino.nome}" paginator="true" rows="10" filteredValue="#{treinoManagedBean.filtroTreinos}" id="TableTreinos"
					styleClass="PainelTrabalho">  
				  
			        <p:column headerText="#{msg.NOME}" sortBy="#{treino.nome}" filterBy="#{treino.nome}" id="nome">  
			            <h:outputText value="#{treino.nome}"/>
			        </p:column>
			        
			        <p:column headerText="#{msg.DINHEIRO}" sortBy="#{treino.cash}" id="cash">  
			             <h:outputText value="#{treino.cash}"/>
			        </p:column>
			        
			        <p:column headerText="#{msg.EXPERIENCIA}" sortBy="#{treino.pontos}" id="pontos">  
			             <h:outputText value="#{treino.pontos}"/>
			        </p:column>
			        
			        <p:column headerText="#{msg.TEMPO_NECESSARIO}" sortBy="#{treino.tempoNecessario}" id="tempoNecessario">  
			             <h:outputText value="#{treino.tempoNecessario}"/>
			        </p:column>
			       			        
			        <p:column headerText="#{msg.TREINO}" id="treinar">
			  			<h:commandLink action="#{treinoManagedBean.teste}">
				  			<f:setPropertyActionListener target="#{treinoManagedBean.treino}" value="#{treino}"/>
				  			<h:graphicImage url="/imagens/select.png" title="Selecionar" alt="Selecionar"/>
			  			</h:commandLink>
			        </p:column>        
			    </p:dataTable> 
				</center>
			</p:panel>
		</h:form>
	</ui:define>
	
</ui:composition>
</html>

